from kyb_caps import kybcaps,By,sleep
from appium import webdriver

# id 定位
# 输入用户名、输入密码，点击登录
def login():
    driver = kybcaps()
    driver.find_element(By.ID, 'com.tal.kaoyan:id/login_email_edittext').send_keys('ammyxh01')
    driver.find_element(By.ID, 'com.tal.kaoyan:id/login_password_edittext').send_keys('ammyxh01')
    driver.find_element(By.ID, 'com.tal.kaoyan:id/login_login_btn').click()
    sleep(3)
    return driver
if __name__ == '__main__':
    pass